<template>
  <iframe
    :src="this.txtUrl"
    frameborder="0"
    width="100%"
    :style="{ height: calHeight }"
    scrolling="auto"
  ></iframe>
</template>
<script>
import { setTokenDKY } from '@/utils/auth'
import axios from 'axios'

export default {
  data() {
    return {
      txtUrl: "http://192.168.4.114:8086/#/reagentcabinet"
    };
  },
  computed: {
    //计算属性 , 设置iframe高度为窗口高度少100px
    calHeight() {
      return window.innerHeight - 100 + "px";
    }
  },
  created() {
    console.log(this.txtUrl);
    this.handleSearch()
  },
  methods: {
    handleSearch() {
      // axios({
      //   url:'http://192.168.4.114:8038/JwtAPI/AuthAsync/AccountLoginAsync',
      //   method:'get',
      //   params:{
      //     phone: '13812340001',
      //     password: '123456',
      //     clientType: 'eLab_Server'
      //   }
      //   }).then(res=>{
      //     console.log(res);
      //     console.log(1111111111)
      //     // setTokenDKY(res.token.access_token);
      //   });
    },
  }
};
</script>
